import java.util.*;
public class Player
{
private int strength = 100;
public Map<String, Thing> bag = new HashMap<>();
  
public void step() {
     this.strength -= 10;    
    }
    
public void eat(String thingName) {
   Thing thing = bag.get(thingName);
   if(thing != null) {
       this.strength += thing.getEnergy();
       System.out.println("你吃掉了" + thing.getName());
       //System.out.println("你的能量+" + thing.getEnergy() + ". ");
       System.out.println("你目前的能量为：" + this.strength);
   }else{
       System.out.println("no");
   }
}

public void pick(Thing thing) {
    bag.put(thing.getName(),thing);
}

public int getStrength(){
    return this.strength;
}

public int minStrength(){
    this.strength-=40;
    return this.strength;
}

public int plusStrength(){
    this.strength+=60;
    return this.strength;
}

}